package day0228;

import java.util.Arrays;

public class Demo01 {


    public static void main(String[] args) {
        String str = "abc";
        System.out.println(str);

        String indent = str.indent(2);
        System.out.println(indent);


        String s = "    ";
        // length == 0  || 全是空白字符
        System.out.println(s.isBlank()); // true
        // isEmpty()  length == 0
        System.out.println(s.isEmpty()); // true

//        String join = String.join(",", "a", "b", "c", "d");
        String join = String.join(",", new String[]{"a", "b", "c", "d"});
        System.out.println(join); // a,b,c,d

        String[] split = join.split(",");
        System.out.println(Arrays.toString(split));

        String repeat = "6".repeat(6);
        System.out.println(repeat);

        System.out.println("  a   b   c   ".strip());
        System.out.println("  a   b   c   ".replace(" ", ""));

    }
}
